﻿<div>

<h2>JavaScript 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: js; highlight: [6,12]" >

    $(function () {
        $("#tree").tree({
            method: "get",
            lines: true,
            url: "tree/tree-data.json",
            autoBindDblClick: true,
            enableContextMenu: true,
            contextMenu: [
                {
                    text: "测试菜单1", iconCls: "icon-hamburg-address", disabled: false,
                    handler: function () {
                        alert("您点击了测试菜单1");
                    }
                },
                { text: "测试菜单2", children: [
                    { text: "测试子菜单1", handler: function () { alert("aaa"); } },
                    { text: "测试子菜单2", handler: function () { alert("bbb"); } }
                ]
                },
                "-",
                { text: "测试菜单3", iconCls: "icon-hamburg-pencil", disabled: false, handler: function () { alert("您点击了测试菜单3"); } }
            ]
        });
    });

</textarea>
<h2>HTML 代码：</h2>
<textarea name="dp-syntaxhighlighter" class="brush: html; highlight: []" >
    
    <ul id="tree"></ul>

</textarea>


</div>